<?php

class DefaultController extends Controller
{
	public $layout='/layouts/column1';
	
	public function actionIndex()
	{
		
		$loggedIn=!Yii::app()->user->isGuest;
		$profileIncomplete=false;
		if($loggedIn){
		$userData=User::model()->findbyPk(Yii::app()->user->id);
			$profileIncomplete=(empty($userData->email)||empty($userData->mobile));
		}
		$this->render('index',array('loggedIn'=>$loggedIn,'profileIncomplete'=>$profileIncomplete));
	}
	
	public function actionAdmin()
	{
		$this->render('admin');
	}
	public function actionFacts()
	{
		$this->render('facts');
	}
}